<template>
    <div>
        Child--={{ title }}
        {{ item?.name }}
        <button @click="handleClick">子传父</button>
    </div>
</template>

<script lang="ts">
import type { PropType } from 'vue'
interface IProps {
    name: string,
    age: number,
    list: Array<number>
}
export default {
    props: {
        title: String, //未结合ts
        item: Object as PropType<IProps>
    },
    methods: {
        handleClick() {
            this.$emit("event", "qqq")
        }
    },
    emits: {
        event(payload: string) {
            return payload
        }
    }
}
</script>